Skip to content

Use async features in example generator - #88

Merged
superkhau merged 1 commit into
masterfrom
feature/async-sample-data
Feb 25, 2015
Merged

Use async features in example generator#88
superkhau merged 1 commit into
masterfrom
feature/async-sample-data

Conversation

@superkhau

Copy link
Copy Markdown
Contributor
  • Change app.importing to app.booting
  • Use callbacks instead of emitting import done
  • Replace import done event with the ready event

Connected to #74

@superkhau superkhau self-assigned this Feb 20, 2015
@superkhau

Copy link
Copy Markdown
Contributor Author

@bajtos Review please.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this exit the process with a non-zero status code when the import fails?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as long as err is returned in the callback (we throw by default in strongloop/loopback-workspace@223758f#diff-383e9ce062435fb34a4326cdf175c907R16 causing an unhandledException event causing Node to return 1 for the exit code). I did a smoke test by changing the name of the JSON file in import.js deliberately causing a missing file error then checking the exit status in bash via echo $? which returned 1.

@superkhau
superkhau force-pushed the feature/async-sample-data branch from 296406d to 3d2a1f3 Compare February 21, 2015 02:07
@superkhau

Copy link
Copy Markdown
Contributor Author

@bajtos Review please.

@bajtos

bajtos commented Feb 24, 2015

Copy link
Copy Markdown
Member

The code LGTM. Please update the commit message before landing, "Replace import done event with the ready event" is no longer true.

@bajtos bajtos assigned superkhau and unassigned bajtos Feb 24, 2015
@superkhau

Copy link
Copy Markdown
Contributor Author

TY, commit message removed.

@superkhau
superkhau force-pushed the feature/async-sample-data branch from 3d2a1f3 to be69bbd Compare February 24, 2015 18:18
@bajtos

bajtos commented Feb 24, 2015

Copy link
Copy Markdown
Member

Cool, please land the patch yourself. Do you have permissions to publish a new version to npmjs.org? Does this depend on a new version of loopback-workspace (see strongloop/loopback-workspace#172)? In that case we should bump up the minimum required version in package.json too.

@superkhau

Copy link
Copy Markdown
Contributor Author

TY, yes I have publish permissions. I will bump the strongloop/loopback-workspace version and merge accordingly.

- Change `app.importing` to `app.booting`
- Use callbacks instead of emitting `import done`
@superkhau
superkhau force-pushed the feature/async-sample-data branch from be69bbd to a21f613 Compare February 24, 2015 22:48
superkhau added a commit that referenced this pull request Feb 25, 2015
Use async features in example generator
@superkhau
superkhau merged commit e86ab68 into master Feb 25, 2015
@superkhau superkhau removed the #review label Feb 25, 2015
@superkhau
superkhau deleted the feature/async-sample-data branch February 25, 2015 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants